 /**
   * Copyright 2014 Viettel Telecom. All rights reserved.
   * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
   */
 package com.viettel.core.bussiness.cms; 
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired; 

import com.viettel.core.exceptions.BusinessException; 
import com.viettel.core.exceptions.DataAccessException; 
import com.viettel.core.dao.cms.RegimensDetailDAO;
import com.viettel.core.entities.cms.RegimensDetail;
import com.viettel.core.entities.vo.RegimenSearchFilter;
import com.viettel.core.entities.vo.RegimenVO;
 /**
   *  Mo ta muc dich cua lop (interface)
   *  @author: TOANTM1
   *  @version:  
   *  @since: 27/02/2014 - 11:34:02
   */
 public class RegimensDetailMgrImpl implements RegimensDetailMgr{ 
	@Autowired 
	RegimensDetailDAO regimensDetailDAO; 
 
 	/**@author TOANTM1
  	 * 27/02/2014 - 11:34:02
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public RegimensDetail getRegimensDetailById(Integer id) throws BusinessException { 
		try { 
			return  regimensDetailDAO.getRegimensDetailById(id);
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**@author TOANTM1
  	 * 27/02/2014 - 11:34:02
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public RegimensDetail createRegimensDetail(RegimensDetail regimensDetail) throws BusinessException { 
		try { 
			return regimensDetailDAO.createRegimensDetail(regimensDetail);
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**@author TOANTM1
  	 * 27/02/2014 - 11:34:02
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public void updateRegimensDetail(RegimensDetail regimensDetail) throws BusinessException { 
		try { 
			regimensDetailDAO.updateRegimensDetail(regimensDetail);
		} catch (DataAccessException e) {	 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**@author TOANTM1
  	 * 27/02/2014 - 11:34:02
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public void deleteRegimensDetail(RegimensDetail regimensDetail) throws BusinessException { 
		try { 
			regimensDetailDAO.deleteRegimensDetail(regimensDetail);
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	}

	@Override
	public List<RegimenVO> getListRegimensDetailByArticleId(Integer id)
			throws BusinessException {
		try { 
			return  regimensDetailDAO.getListRegimensDetailByArticleId(id);
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	}

	@Override
	public List<RegimenVO> getListRegimensDetailByFilter(
			RegimenSearchFilter filter) throws BusinessException {
		try { 
			return  regimensDetailDAO.getListRegimensDetailByFilter(filter);
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
} 
